<html>
<head>
<base href="http://set-by-base.example.com/">
</head>
<body>
<iframe src="about:blank"></iframe><br>
<iframe src=""></iframe><br>
<pre>
<script>
if (window.testRunner)
  testRunner.dumpAsText();

document.cookie = 'cookie=parent';

document.write('--- Test begins ---\n');
document.write('* "about:blank"\n');
document.write('document.URL = ' + frames[0].document.URL + '\n');
document.write('document.baseURI = ' + frames[0].document.baseURI + '\n');
document.write('document.cookie = ' + frames[0].document.cookie + '\n');
document.write('* ""\n');
document.write('document.URL = ' + frames[1].document.URL + '\n');
document.write('document.baseURI = ' + frames[1].document.baseURI + '\n');
document.write('document.cookie = ' + frames[1].document.cookie + '\n');
document.write('--- After document.open() ---\n');
frames[0].document.open();
frames[1].document.open();
document.write('* "about:blank"\n');
document.write('document.URL = ' + frames[0].document.URL + '\n');
document.write('document.baseURI = ' + frames[0].document.baseURI + '\n');
document.write('document.cookie = ' + frames[0].document.cookie + '\n');
document.write('* ""\n');
document.write('document.URL = ' + frames[1].document.URL + '\n');
document.write('document.baseURI = ' + frames[1].document.baseURI + '\n');
document.write('document.cookie = ' + frames[1].document.cookie + '\n');
document.write('--- After document.close() ---\n');
frames[0].document.close();
frames[1].document.close();
document.write('* "about:blank"\n');
document.write('document.URL = ' + frames[0].document.URL + '\n');
document.write('document.baseURI = ' + frames[0].document.baseURI + '\n');
document.write('document.cookie = ' + frames[0].document.cookie + '\n');
document.write('* ""\n');
document.write('document.URL = ' + frames[1].document.URL + '\n');
document.write('document.baseURI = ' + frames[1].document.baseURI + '\n');
document.write('document.cookie = ' + frames[1].document.cookie + '\n');
document.write('--- Test ends ---\n');
</script>
</pre>
</body>
</html>
